@echo off
echo ========================================
echo 火车订票系统 - 测试运行脚本
echo ========================================
echo.

echo 正在清理之前的测试结果...
if exist target\surefire-reports rmdir /s /q target\surefire-reports
if exist target\test-classes rmdir /s /q target\test-classes

echo.
echo 正在运行单元测试...
call mvn test -Dspring.profiles.active=test

echo.
echo 正在生成测试报告...
call mvn surefire-report:report

echo.
echo 测试完成！
echo 测试报告位置: target\site\surefire-report.html
echo.

pause
